The present invention relates to a system and method for processing an image and, in particular, to a video image tracking engine system and method for capturing and processing image pixel data to rapidly determine image characteristics.
Conventional video guidance and tracking systems tend to be heavy, bulky, and slow. One prior art system that suffers from these drawbacks is the Proto-Flight Video Guidance Sensor (Proto-Flight VGS) described in VGS CEI Spec., Part I-MSFC Document #MSFC-SPEC-2614A, 1997. The Proto-Flight VGS weighs 88 pounds, is 1800 cubic inches, consumes 168 watts, and operates at only 5 cycles per second. The Proto-Flight VGS uses a commercial analog CCD camera. Although the Proto-Flight VGS has previously been utilized in experiments on shuttle flights STS-87 and STS-95, due to its size, weight and speed, the Proto-Flight VGS is of limited usefulness in other applications.
Analog video cameras, such as the CCD camera, output image pixel data mixed with timing and display pulses in a composite signal, thus preventing precise separation and digitization of the image pixels. A complex analog video signal sync separator/digitizer/counter-based frame grabber is used to process the composite signal. However, one disadvantage of the complex frame grabber is that it precludes real-time sub-windowing by the camera, that is, capturing and analyzing only a portion of a camera""s field of view rather than the camera""s complete field of view.
The Proto-Flight VGS software has two different pixel algorithms in five different imaging schemes that are selected based on a range and a sensor mode. Both pixel algorithms require complex software computation with 20 to 50 instructions per pixel. Although complex, the pixel algorithms of the Proto-Flight VGS software are insufficient for edge tracking and moment detection. One additional disadvantage of prior art image/object tracking systems is that the imager (e.g., camera) does not produce (i.e., output) synchronous data. As described above, the camera outputs a composite signal comprised of image pixel data mixed with timing pulses and display pulses. Consequently, image pixel data can not be stored in memory such that a processor can access individual pixel data directly without requiring additional unpacking instruction or memory wait states.
Other prior art image trackers store and process pixel positions of all image pixel data above a threshold. This can slow down the image tracker by requiring storage and processing of more pixel data than is necessary.
The present invention provides a system and method for processing an image containing a spot representing an object, comprising: capturing an image as an array of image pixel data, wherein said array is comprised of a plurality of columns and rows whereby each image pixel has an associated x-coordinate and y-coordinate; generating a respective memory address for each image pixel datum in said array of image pixel data and maintaining information in association with each said memory address identifying the position within said image of its respective image pixel datum; storing each image pixel datum in its respective memory address; comparing each image pixel datum to a threshold to identify linear spot segments wherein the pixel data from two or more pixels located in adjacent columns in the image exceed said threshold, said linear spot segments representing a portion of said object; and identifying and storing the array coordinates determined from the respective memory addresses for only the first and last pixel of each linear spot segment in said image pixel data. Spots in the image are identified based upon linear spot segments that appear in adjacent rows of the image and characteristics of these spots can be determined from the stored information. Movement characteristics of a spot, such as velocity, can be determined by comparing successive captured images. In a further, alternative embodiment, additional data for each linear data segment is saved such as sum of pixels and the weighted sum of pixels.
In one embodiment, the threshold is described with respect to a particular pixel intensity (viz., a particular voltage) and intensity data from each pixel is compared to the threshold to determine if the pixel intensity is greater than the threshold. This process is called xe2x80x9cthresholdingxe2x80x9d the data. The pixels exceeding the threshold are called threshold pixels. The threshold may be either manually determined or it may be automatically set, for example, by using an automatic gain control (AGC) responsive to prior data captures.
Data describing each image pixel is stored in an associated memory address that corresponds with the location of that particular image pixel in the captured image. Thus, if an object or xe2x80x9cspotxe2x80x9d appears within the captured image, as the pixel data is thresholded, a linear segment of pixels exceeding the threshold will appear in each row at the position of the spot, thus creating a linear spot segment. Advantageously, the position (e.g., x-coordinates and y-coordinates as determined by memory address) of the first and last pixel in a linear spot segment of the image are identified and stored. As successive rows of the captured image are processed, the identified pixels define a composite two dimensional image spot.
In a further embodiment, the method provides for processing, i.e., thresholding (and subsequently identifying and storing), only certain portions of the captured image. In such an embodiment, although the data describing all the pixels from the captured image may be first stored in their respective memory locations, only those pixels falling within a particular region of interest (ROI) are thresholded. Consequently, only the threshold pixels appearing within that region of interest are identified and stored. This is particularly useful if only the ROI is relevant or if a change is expected in the ROI, such as movement of the subject spot or the appearance of a second spot. If the ROI is sufficiently small as compared to the entire captured image, processing the pixel data only in an ROI can provide greatly improved speed and efficiency, thereby permitting a faster image capture and processing rate.
In a further embodiment, a second image is captured and processed. Movements of a linear spot segment can be tracked based on comparing the respective first and last pixel positions of the linear spot segment present in the first image pixel data with those in the second image pixel data (typically, the comparison is carried out once the composite spots are defined). Further images can be captured and processed to further track the linear spot segment and, predictions regarding spot movement (to dynamically define the ROI) can be made based on the processing of previously captured images.
In addition to thresholding to determine the positions of the spots (or linear spot segments), areas of non-interest can also be removed from the captured image prior to processing. This can be done simply by comparing the captured image to a prior captured image and processing only the changes or, as set forth above, by defining a region of non-interest, thereby removing that region from further processing.
It is advantageous when using the system and method of the invention that the spots to be tracked appear very bright with respect to the background in the captured image, i.e., high contrast. This allows the threshold to be set very high so that only the pixels in the immediate region of the spots need to be processed and stored. Supplementary lighting may be used to enhance the relative brightness of the spots especially, for instance when the objects to be tracked are provided with a reflective or retro-reflective surface. Supplementary lighting may include, for example, laser lighting or another type of auxiliary lighting. Advantageously, in particular situations, the tracked object may be fitted with LEDs (light emitting diodes) or an alternative type of light emitting device. Either type of light source may constantly illuminate or be flashing. It is preferable to control the lighting so that it flashes in sync with the image capture device to thereby control the exposure of the image capture device, thus enhancing image discrimination and control.
Other features and advantages of the present invention will be set forth in, or apparent from, the detailed description of the preferred embodiments which is set forth below.